this._unmaximizing = [];
this._mapping = [];
this._destroying = [];
+ this._movingWindow = null;
this._dimmedWindows = [];
this._switchData = switchData;
switchData.inGroup = new Clutter.Group();
switchData.outGroup = new Clutter.Group();
+ switchData.movingWindowBin = new Clutter.Group();
switchData.windows = [];
let wgroup = global.window_group;
wgroup.add_actor(switchData.inGroup);
wgroup.add_actor(switchData.outGroup);
+ wgroup.add_actor(switchData.movingWindowBin);
for (let i = 0; i < windows.length; i++) {
let window = windows[i];
if (!window.meta_window.showing_on_its_workspace())
continue;
- if (window.get_workspace() == from) {
+ if (this._movingWindow && window.meta_window == this._movingWindow) {
+ switchData.movingWindow = { window: window,
+ parent: window.get_parent() };
+ switchData.windows.push(switchData.movingWindow);
+ window.reparent(switchData.movingWindowBin);
+ } else if (window.get_workspace() == from) {
switchData.windows.push({ window: window,
parent: window.get_parent() });
window.reparent(switchData.outGroup);
switchData.inGroup.set_position(-xDest, -yDest);
switchData.inGroup.raise_top();
+ switchData.movingWindowBin.raise_top();
+
Tweener.addTween(switchData.outGroup,
{ x: xDest,
y: yDest,
Tweener.removeTweens(switchData.outGroup);
switchData.inGroup.destroy();
switchData.outGroup.destroy();
+ switchData.movingWindowBin.destroy();
+
+ if (this._movingWindow)
+ this._movingWindow = null;
shellwm.completed_switch_workspace();
},
if (activeWorkspace != toActivate)
toActivate.activate(global.get_current_time());
-
if (!Main.overview.visible)
this._workspaceSwitcherPopup.display(direction, toActivate.index());
},
if (activeWorkspace != toActivate) {
// This won't have any effect for "always sticky" windows
// (like desktop windows or docks)
+
+ this._movingWindow = window;
window.change_workspace(toActivate);
global.display.clear_mouse_mode();